package Lab2;

public class Patterns {
    public static void main(String[] args) {
        int num = Integer.parseInt(args[0]);
        Patterns patterns = new Patterns();
        patterns.printPattern1(num);
        patterns.printPattern2(num);
    }
    public void printPattern1(int num) {
        for (int i = 0; i < num + 1; i++) {
            for (int j = 0; j < i; j++) {
                System.out.print(j + 1 + " ");
            }
            System.out.println();
        }
    }
    public void printPattern2(int num) {
        for (int i = 0; i < num + 1; i++) {
            for (int j = 0; j < num - i; j++) {
                System.out.print(j + 1 + " ");
            }
            System.out.println();
        }
    }
}
